<%@ page import="java.util.ArrayList" %>
<%@ page import="core.Professor" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Pesquisa - SAW</title>
</head>
<body>

<h1>Resultado Pesquisa Professor</h1>

<form action="ProfessorServlet" method="get">
<table>

<%
ArrayList<Professor> lstProfessor = (ArrayList<Professor>)request.getAttribute("lista_resposta");

int tamanho = lstProfessor.size();

for( int i = 0; i < tamanho; i++ ) {
	if( (i % 2) == 0 ) { %>

<tr bgcolor="#ccccff">
<%	} else { %>
<tr bgcolor="#ffffff">
<%	} %>
<td>
<%=lstProfessor.get(i).getMatricula() %>
</td><td>
<%=lstProfessor.get(i).getNome() %>
</td><td>
<button name="remover" value="<%=lstProfessor.get(i).getMatricula() %>" type="submit">Remover</button>
</td><td>
<button name="editar" value="<%=lstProfessor.get(i).getMatricula() %>" type="submit">Editar</button>
</td></tr>
<%
}
%>
</table>

<p><a href="index.jsp">Home</a></p>

</body>
</html>